unsigned char tpal[]={
  0,0,0,
  0x1d,0x29,0x5a,
  0x1d,0x38,0x76,
  0x1d,0x48,0x92,
  0x1c,0x5c,0xac,
  0x1c,0x71,0xc6,
  0x32,0x86,0xcf,
  0x48,0x9b,0xd9,
  0x4e,0xa8,0xec,
  0xc0,0xc2,0xff,
  0x79,0x99,0xff,
  252,252,252,
  252,252,252,
  252,252,252,
  252,252,252,
  252,252,252,
  252,252,252,
  252,252,252,
  252,252,252,
  252,252,252,
  252,252,252,
  252,252,252,
  252,252,252,
  252,252,252,
  252,252,252,
  252,252,252,
  252,252,252,
  252,252,252,
  252,252,252,
  252,252,252,
  16,48,148,
  12,16,104,
  32,32,228,
  0,0,40,
  32,88,228,
  8,8,80,
  32,56,228,
  24,80,204,
  0,0,16,
  8,40,104,
  8,8,72,
  20,56,164,
  24,48,204,
  56,32,228,
  8,40,80,
  32,104,228,
  32,16,112,
  16,56,156,
  8,8,56,
  16,16,120,
  8,24,80,
  24,24,164,
  48,24,196,
  16,40,120,
  8,32,72,
  32,72,228,
  40,32,228,
  32,88,212,
  24,80,168,
  0,16,40,
  24,72,196,
  24,32,172,
  32,112,228,
  0,8,16,
  16,56,140,
  16,16,132,
  16,8,72,
  16,48,132,
  48,24,164,
  32,32,216,
  40,16,156,
  24,56,180,
  32,48,228,
  8,24,56,
  8,24,96,
  32,48,212,
  24,96,196,
  24,104,212,
  64,32,228,
  8,0,40,
  32,96,228,
  16,32,132,
  0,8,32,
  8,40,96,
  40,24,164,
  24,8,80,
  24,12,104,
  32,64,212,
  16,48,156,
  32,120,228,
  16,40,112,
  32,64,228,
  48,32,228,
  24,8,96,
  8,24,72,
  16,72,144,
  32,52,220,
  16,40,148,
  24,72,180,
  32,16,132,
  0,24,48,
  16,56,132,
  24,48,180,
  24,88,180,
  16,32,120,
  32,16,156,
  32,80,228,
  8,16,56,
  0,8,24,
  28,96,212,
  24,32,156,
  72,40,220,
  8,8,48,
  16,16,112,
  8,32,80,
  16,8,80,
  32,24,144,
  32,40,228,
  56,24,196,
  24,72,156,
  24,24,180,
  8,48,96,
  8,32,96,
  16,8,96,
  32,96,200,
  0,16,48,
  40,104,228,
  48,24,180,
  64,32,220,
  32,16,120,
  48,104,220,
  24,44,148,
  16,24,120,
  32,72,220,
  68,44,228,
  48,44,228,
  40,24,180,
  24,24,156,
  24,40,204,
  16,64,144,
  8,8,64,
  16,48,120,
  8,24,64,
  24,64,204,
  32,36,188,
  44,84,220,
  8,16,80,
  16,48,112,
  24,56,156,
  24,80,180,
  16,56,120,
  8,40,72,
  24,64,172,
  24,56,196,
  16,32,104,
  24,64,180,
  24,40,164,
  24,48,156,
  8,16,72,
  28,76,148,
  32,104,220,
  8,24,104,
  40,24,156,
  40,44,228,
  8,40,88,
  32,16,148,
  24,92,188,
  24,16,112,
  52,32,220,
  40,32,220,
  16,68,132,
  40,48,148,
  8,24,88,
  20,24,148,
  24,72,188,
  8,0,28,
  40,96,228,
  40,56,228,
  16,80,156,
  56,32,204,
  16,44,140,
  32,96,220,
  16,40,96,
  8,32,88,
  0,16,32,
  32,88,196,
  16,56,148,
  72,32,228,
  8,16,96,
  40,124,228,
  40,112,228,
  56,40,228,
  40,32,140,
  40,64,204,
  32,32,204,
  16,24,112,
  16,40,104,
  8,16,48,
  40,20,132,
  36,24,120,
  32,80,204,
  16,64,156,
  24,16,120,
  40,56,220,
  16,24,96,
  16,48,104,
  16,32,112,
  32,88,220,
  24,32,180,
  16,8,56,
  24,16,96,
  16,16,96,
  8,16,64,
  24,96,176,
  32,40,220,
  32,40,160,
  28,24,172,
  48,72,220,
  56,40,220,
  24,8,88,
  40,64,228,
  0,16,24,
  24,64,188,
  32,24,180,
  32,80,188,
  24,96,204,
  16,64,120,
  16,24,104,
  16,32,140,
  32,40,196,
  40,16,112,
  56,24,204,
  16,60,112,
  24,24,140,
  32,48,156,
  24,16,132,
  24,48,188,
  24,72,164,
  48,24,188,
  16,8,88,
  16,8,64,
  8,32,64,
  24,56,204,
  32,24,204,
  40,96,204,
  16,80,148,
  32,72,208,
  32,32,148,
  32,112,220,
  32,24,156,
  32,56,204,
  40,16,148,
  48,104,228,
  24,32,204,
  24,32,164,
  64,48,196
};

unsigned char titles[]={
  0,28,175,40,94,54,66,85,63,0,200,123,98,56,217,80,119,110,162,98,162,
  66,0,195,125,159,220,106,80,152,94,112,0,4,247,229,108,0,191,175,83,243,
  91,130,176,58,112,0,7,63,144,52,0,190,199,130,80,207,55,111,171,0,10,
  31,156,38,0,120,211,0,48,197,0,18,137,218,130,78,78,224,66,0,11,47,
  106,182,0,119,125,220,148,63,0,44,175,122,0,17,175,159,117,203,252,214,137,
  175,0,11,63,134,62,192,0,119,199,80,130,255,108,0,42,63,104,0,17,175,
  237,45,176,145,130,122,0,13,182,56,55,171,0,119,250,176,145,217,224,40,0,
  40,94,229,108,0,17,37,78,78,78,189,159,0,14,185,34,80,141,0,118,79,
  176,78,111,244,205,148,180,0,38,199,124,175,0,17,205,62,169,92,214,185,63,
  0,13,197,190,187,43,0,119,116,34,135,218,159,210,219,90,74,175,0,34,175,
  131,177,73,0,18,128,89,96,220,75,221,0,14,245,130,43,92,0,119,117,45,
  163,203,232,210,123,205,204,41,112,0,32,63,200,220,241,0,18,211,117,190,80,
  91,107,0,14,175,34,126,43,208,0,118,158,181,126,207,152,182,204,206,232,196,
  182,171,121,0,30,94,124,189,182,0,19,116,34,45,128,205,0,15,188,62,130,
  91,50,0,118,98,128,78,134,63,221,182,232,198,198,205,210,170,64,0,28,182,
  190,218,162,0,20,54,62,45,91,0,16,119,160,78,62,38,0,117,63,45,56,
  92,61,0,3,142,99,116,141,206,182,230,103,63,0,25,162,189,176,165,0,22,
  78,78,150,0,16,66,94,197,0,119,210,189,72,217,188,0,5,94,171,232,147,
  154,205,213,85,0,22,108,37,177,80,244,63,0,22,49,92,44,0,138,120,62,
  80,91,175,0,7,85,198,141,230,182,247,49,0,20,151,231,78,80,255,175,0,
  23,108,229,141,0,137,38,34,126,218,160,0,9,38,114,53,205,211,206,254,108,
  0,17,54,80,117,32,106,40,0,25,54,124,0,137,101,190,80,91,182,0,11,
  63,114,205,204,196,58,112,0,15,162,78,89,32,169,54,0,27,119,142,0,136,
  231,128,78,45,197,0,11,112,85,230,232,86,182,247,0,13,175,213,92,191,45,
  106,104,0,28,159,118,0,135,112,56,163,92,109,38,0,9,205,213,92,179,84,
  141,154,241,0,13,100,200,126,32,177,80,159,0,27,175,119,62,43,66,0,134,
  132,220,91,177,196,0,7,209,159,187,78,189,91,91,194,164,0,14,85,78,189,
  160,176,91,68,0,26,175,141,91,106,80,72,177,38,0,133,34,72,36,34,241,
  0,4,175,210,179,135,176,56,117,190,34,104,108,0,14,141,56,168,34,78,187,
  60,38,0,25,121,80,34,80,89,126,106,91,172,0,132,66,78,34,217,179,221,
  0,2,73,58,177,91,36,32,160,220,91,226,175,0,14,175,97,176,72,56,126,
  117,120,38,0,24,123,179,80,43,89,78,78,78,248,205,63,0,132,116,32,45,
  34,81,221,85,210,162,189,181,91,91,176,45,149,63,0,15,108,250,36,176,91,
  207,45,71,197,0,23,108,250,91,72,80,36,34,214,169,137,73,0,60,175,223,
  32,155,73,0,19,66,124,106,141,175,0,45,32,36,55,187,182,205,46,46,68,
  80,78,45,80,68,79,0,16,54,45,176,34,130,45,62,58,100,0,23,175,76,
  34,91,34,34,80,176,216,50,38,0,61,173,55,117,89,52,0,19,92,62,89,
  62,141,0,44,182,106,72,34,236,114,182,195,132,75,176,55,152,197,0,17,129,
  134,43,78,78,43,128,95,241,0,23,162,80,78,78,62,189,78,68,164,197,0,
  63,47,217,80,62,117,0,19,55,89,187,187,162,0,44,127,45,80,176,101,182,
  205,90,180,193,47,54,0,18,148,43,56,56,43,92,179,113,94,0,23,137,32,
  106,92,56,126,133,113,40,63,0,64,129,89,43,248,53,0,19,124,62,56,52,
  48,0,43,175,92,176,43,89,219,210,46,170,159,54,0,18,108,193,80,117,55,
  91,91,236,122,74,0,23,105,55,163,45,117,36,57,205,197,0,67,148,36,182,
  175,0,19,175,124,250,212,0,44,74,72,80,36,152,172,93,132,182,38,0,18,
  66,179,62,55,34,220,55,157,204,227,38,0,22,157,34,34,34,126,34,131,219,
  73,0,139,102,80,176,207,147,172,66,38,0,19,182,32,92,45,89,190,34,64,
  204,227,38,0,22,70,189,78,134,78,43,192,172,63,0,139,112,126,89,78,179,
  182,175,0,20,112,80,36,55,89,187,128,46,205,90,182,0,22,112,92,34,92,
  92,92,233,35,0,84,175,194,32,73,0,53,202,45,106,163,84,73,0,22,54,
  34,190,62,223,129,113,232,170,251,112,0,21,120,117,80,72,177,97,197,0,84,
  108,42,91,55,241,0,53,250,34,45,72,154,0,24,108,179,103,204,204,113,198,
  148,249,129,175,0,20,55,55,190,34,116,59,0,39,158,0,4,175,66,66,151,
  0,7,158,94,54,108,0,6,54,85,112,0,17,179,176,117,190,73,0,19,112,
  66,151,54,108,0,10,125,108,0,4,66,85,151,108,0,8,125,91,187,89,200,
  82,0,25,38,44,182,182,206,198,237,228,104,146,0,20,62,89,78,124,54,0,
  36,112,159,201,155,102,0,3,54,229,56,117,34,127,175,0,4,205,89,62,189,
  54,0,5,108,62,43,249,0,2,226,89,45,56,66,0,10,56,62,34,85,0,
  5,253,36,91,36,0,9,94,102,243,137,119,231,179,148,94,0,5,178,119,245,
  187,221,0,2,108,103,43,92,45,124,151,0,7,162,145,91,45,232,0,28,240,
  182,90,180,119,148,247,90,241,0,19,62,55,177,39,38,0,36,81,34,134,89,
  148,0,2,94,124,31,158,163,45,56,202,0,4,127,89,190,62,73,0,5,66,
  190,72,211,0,2,124,62,89,32,197,0,9,112,106,200,0,6,73,34,220,72,
  200,0,7,175,186,45,243,63,0,2,175,56,45,78,85,0,3,73,62,62,55,
  72,0,2,108,179,159,175,138,126,89,124,0,7,32,45,45,78,63,0,29,142,
  46,205,192,70,139,170,147,197,0,18,43,45,80,197,0,37,155,45,91,80,85,
  0,1,197,57,59,0,1,94,34,160,250,157,0,3,112,32,106,62,124,0,6,
  157,62,34,197,0,1,79,77,190,89,80,0,10,119,237,62,182,0,5,53,78,
  55,34,162,0,6,94,200,80,145,50,0,4,158,124,52,229,38,0,2,205,248,
  43,190,119,0,2,222,206,0,2,34,78,118,76,184,0,5,158,91,62,176,154,
  0,31,197,182,167,235,157,198,167,182,63,0,17,72,176,205,0,38,89,78,45,
  109,63,63,226,112,0,2,232,118,198,205,164,0,3,157,72,126,78,183,0,6,
  62,78,198,0,2,112,41,62,187,86,0,9,162,151,175,231,45,158,0,4,98,
  177,106,126,112,0,5,175,106,89,78,178,0,5,73,58,81,81,112,0,2,162,
  106,36,34,241,0,1,44,94,0,2,175,181,116,86,182,197,0,5,157,45,187,
  231,63,0,32,82,115,206,67,247,65,196,85,0,17,80,78,100,0,37,66,80,
  177,106,68,0,1,85,184,0,3,53,116,136,174,85,0,2,38,72,80,62,106,
  197,0,5,112,176,92,38,0,2,66,102,126,92,112,0,8,215,129,0,1,175,
  163,124,147,39,0,2,108,45,34,62,77,0,5,112,225,134,80,32,197,0,5,
  85,78,207,227,172,0,2,55,80,176,231,197,112,54,0,3,140,95,254,168,161,
  221,0,4,175,89,62,92,210,0,34,63,172,196,81,116,67,195,66,0,16,34,
  131,0,38,67,126,80,80,172,197,172,0,4,148,242,72,174,158,0,2,107,55,
  187,78,124,0,6,104,34,233,0,2,38,167,87,62,229,38,0,7,205,247,0,
  3,157,237,162,226,63,0,1,182,78,189,78,198,0,5,71,34,36,126,200,0,
  6,40,56,45,71,204,0,1,175,160,78,34,71,63,182,184,0,3,211,149,36,
  92,182,0,5,83,78,62,208,0,37,94,113,67,101,235,206,112,0,15,45,119,
  0,38,103,78,187,78,151,44,63,0,3,221,124,106,145,149,140,0,2,44,176,
  117,56,182,0,6,200,200,0,3,107,156,106,106,237,0,7,94,171,0,4,205,
  76,203,64,209,0,1,149,177,106,32,211,0,4,112,62,126,34,189,210,0,6,
  116,91,80,124,196,0,1,48,224,91,126,170,85,73,0,4,148,126,91,96,183,
  0,5,155,91,62,197,0,38,94,205,90,67,196,182,175,0,14,43,148,0,27,
  175,54,0,9,106,92,92,144,142,240,0,4,154,78,89,78,41,63,0,2,86,
  62,72,203,241,0,5,125,80,182,0,3,44,106,80,126,196,0,7,40,0,5,
  46,43,160,139,107,0,1,68,34,34,69,107,0,4,210,34,78,89,124,33,0,
  6,34,55,78,179,100,0,1,204,150,45,78,182,204,0,4,184,126,89,80,224,
  142,0,4,108,80,190,162,0,40,209,121,230,226,46,85,63,0,13,55,149,0,
  25,112,202,56,148,0,8,158,34,117,36,137,114,0,5,98,217,106,91,196,0,
  3,51,62,80,222,38,0,5,141,213,0,4,238,187,191,160,197,0,13,137,92,
  106,127,73,73,156,181,45,200,0,5,137,80,36,80,93,0,6,54,89,55,117,
  229,184,0,1,53,198,34,193,101,184,0,4,219,187,78,78,68,38,0,4,141,
  187,80,175,0,41,197,172,206,202,167,54,0,13,213,78,210,0,22,197,136,91,
  91,117,148,0,8,67,176,106,217,53,73,0,4,63,106,62,45,57,85,0,3,
  224,62,78,141,0,5,151,187,197,0,4,135,92,135,224,0,14,157,117,80,71,
  112,209,119,231,78,129,0,5,131,45,126,109,172,0,6,127,78,89,163,141,0,
  1,112,67,67,80,166,129,0,5,136,135,92,92,86,0,5,124,91,182,0,43,
  175,44,227,132,147,209,0,12,94,32,117,38,0,19,205,61,176,91,55,55,176,
  197,0,8,127,78,62,45,44,0,5,85,190,78,187,224,0,4,248,80,55,182,
  0,4,175,37,112,0,4,48,36,91,177,170,0,4,175,0,1,54,158,221,0,
  4,125,250,34,145,95,0,1,154,131,194,135,66,0,3,63,0,1,159,43,78,
  118,44,0,5,197,56,43,62,34,184,0,1,94,159,185,43,152,82,0,5,177,
  36,36,87,112,0,4,100,78,200,0,45,63,114,90,205,211,82,0,12,157,32,
  182,63,0,15,175,83,179,45,177,45,80,176,80,124,0,8,108,92,43,34,76,
  107,0,5,137,34,135,56,39,0,3,73,78,78,62,209,0,3,63,194,148,0,
  5,110,177,177,191,182,0,2,63,157,158,54,78,176,231,108,0,3,94,45,89,
  89,209,0,1,64,101,229,250,79,0,2,48,200,0,1,114,117,56,84,122,0,
  5,98,177,36,176,205,0,2,147,251,246,55,232,0,5,54,91,177,163,144,0,
  3,108,73,141,220,54,0,47,85,90,90,172,175,0,12,53,159,93,175,0,12,
  125,226,91,145,91,45,34,78,162,93,240,221,0,8,54,36,92,55,198,0,6,
  150,126,32,69,44,0,1,94,46,142,117,135,80,172,0,2,73,193,88,0,6,
  110,56,177,91,73,0,1,241,99,159,0,1,151,220,106,55,124,0,3,162,78,
  124,182,0,2,141,150,200,153,0,2,74,84,158,0,1,108,229,91,156,182,0,
  4,211,190,106,71,209,0,3,150,234,80,77,184,0,5,209,55,72,72,233,0,
  1,82,182,182,0,1,193,155,0,49,197,205,196,66,0,13,184,240,239,96,98,
  94,0,4,54,162,88,102,34,189,78,45,37,119,66,85,0,13,119,91,56,106,
  94,0,6,175,45,55,193,53,46,90,197,0,1,137,36,45,150,227,210,116,54,
  0,7,157,91,106,229,182,210,154,112,0,2,175,225,34,62,231,198,140,249,92,
  179,108,0,3,232,129,78,119,121,147,204,59,0,3,108,71,148,147,151,0,2,
  94,145,143,209,0,4,112,147,124,191,192,0,7,98,176,36,104,206,132,114,0,
  1,66,89,112,0,50,209,182,195,142,0,15,38,204,193,176,91,91,106,62,55,
  176,34,179,94,66,54,175,0,16,179,106,106,224,0,8,73,124,159,147,197,0,
  4,182,118,147,93,197,175,0,8,38,250,36,148,205,197,63,0,4,63,209,237,
  233,132,247,172,0,6,197,144,191,205,219,112,0,7,112,112,182,204,119,119,54,
  175,0,5,142,68,80,56,82,0,7,175,171,185,195,172,0,3,137,141,0,52,
  63,182,226,197,0,151,194,108,0,53,63,85,46,63,0,149,94,182,0,56,172,
  182,0,149,119,0,58,73,151,0,147,175,100,0,59,197,112,0,146,94,0,61,
  38,175,0,145,175,0,62,221
};
